<% if @reply.errors.empty? %>
  <% flash[:notice] = '回帖更新成功。' %>
  Turbolinks.visit('<%= topic_path(@reply.topic_id) %>');
<% else %>
  $('form[tb="edit-reply"] .alert').remove();
  $('form[tb="edit-reply"]').prepend('<%= j render("shared/error_messages", target: @reply) %>');
<% end %>
